<!--
	缺陷单
-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JZ-energy</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="../css/public.css"/>
		<link rel="stylesheet" type="text/css" href="../css/icons-extra.css" />
		<link rel="stylesheet" type="text/css" href="../libs/minirefresh.min.css" />
		<link rel="stylesheet" type="text/css" href="../libs/themes/default/minirefresh.theme.default.min.css" />
		<style type="text/css">
			html,body {width: 100%;height: 100%;}
			#minirefresh {position: relative;}
		</style>
	</head>
	<body>
		<!--底部导航栏-->
		<nav class="mui-bar mui-bar-tab bg-FFF">
			<a class="mui-tab-item" href="index.html">
				<span class="mui-icon"><img src="../img/index.png"/></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item" href="monitor.html">
				<span class="mui-icon"><img src="../img/jiance.png"/></span>
				<span class="mui-tab-label">监测</span>
			</a>
			<a class="mui-tab-item" href="work.html">
				<span class="mui-icon"><img src="../img/gongzuo.png"/></span>
				<span class="mui-tab-label">工作</span>
			</a>
			<a class="mui-tab-item" href="myInfor.html">
				<span class="mui-icon"><img src="../img/wode.png"/></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav>
		<!--头部导航栏-->
		<header class="mui-bar mui-bar-nav bg-FFF header-bom">
			<a href="" class="mui-action-back mui-icon-extra mui-icon-extra-arrowleftcricle mui-pull-left col-fonts"></a>
			<a href="#topPopover" class="mui-pull-right">
				<div class="rightTop-more">
					<span></span>
					<span class="rightTop-more-two"></span>
					<span></span>
				</div>
			</a>
			<h1 class="mui-title col-fonts">缺陷单</h1>
		</header>
		<!--右上角弹出菜单-->
		<div id="topPopover" class="mui-popover" style="height: 100px;width:93px !important;">
			<div class="mui-popover-arrow"></div>
			<div class="mui-scroll-wrapper">
				<div class="mui-scroll">
					<ul class="mui-table-view">
						<li class="mui-table-view-cell mui-media col-fonts font-13">
							<a href="index.html">
								<img src="../img/float-index.png" class="mui-pull-left floatMes" width="15px"/>
								<span class="mui-pull-right mess-center">首页</span>
							</a>
						</li>
						<li class="mui-table-view-cell mui-media col-fonts font-13 search-list">
							<a id="addpage" href="defectEdit.html?usersel=setuser&defid=0">
								<img src="../img/xinjiaqn.png" class="mui-pull-left floatMes" width="15px"/>
								<span class="mui-pull-right mess-center">新建</span>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="mui-content bg-F8F wh-100">
			<div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-primary activeCol col-fonts bg-FFF">
				<a href="#noXQ" class="mui-control-item mui-active">未消缺</a>
				<a href="#normal" class="mui-control-item">已消缺</a>
				<a href="#leave" class="mui-control-item">有遗留</a>
				<a href="#myInfor" class="mui-control-item">全部</a>
				<a href="" class="searchBtn"><span class="mui-icon mui-icon-search"></span></a>
			</div>
			<div class="mui-indexed-list-search mui-input-row mui-search searchDiv">
				<input type="search" class="mui-input-clear mui-indexed-list-search-input bg-FFF" value="" id="search" style="border-radius: 0px;margin-bottom: 0px;"/>
				<span class="mui-icon mui-icon-clear mui-hidden"></span>
				<span class="mui-placeholder">
					<span class="mui-icon mui-icon-search"></span>
					<span>搜索</span>
				</span>
			</div>
			<div class="bank10"></div>
			<div id="minirefresh" class="minirefresh-wrap" style="height: calc(100% - 40px);">
			<div class="minirefresh-scroll" style="height: calc(100% - 40px);">
				<!--未消缺-->
				<div id="noXQ" class="mui-control-content mui-active">
					<ul class="mui-table-view af-he be-he">
						<li class="mui-table-view-cell mui-media af-he" style="display:none;" id="notshortcom">
							<div id="params" style="display:none;">0</div>
							<div id="defid" style="display:none;"></div>
							<div class="mui-slider-right mui-disabled">
								<a class="mui-btn bg-d6" id="reset_1">设定有遗留</a>
								<a class="mui-btn bg-90" id="reset_2">设定已消缺</a>
								<a class="deleteBtn mui-btn bg-ff">删除</a>
							</div>
							<div class="mui-slider-handle">
								<div class="mui-pull-right  col-FFF patrol font-13" id="result">有遗留</div>
								<div class="mui-media-body col-fonts">
									<div class="font-16 ells" id="des">温度过高 风扇损坏</div>
									<div class="font-13" id="buildtime" data-fmtFun="dateOfEmpty">2017年10月9日发现</div>
								</div>
							</div>
						</li>
						<li class="bank10" id="cutline"></li>
				
					</ul>
				</div>
				<!--已消缺-->
				<div id="normal" class="mui-control-content">
					<ul class="mui-table-view af-he be-he">
						<li class="mui-table-view-cell mui-media af-he" style="display:none;" id="shortcom">
						<div id="params" style="display:none;">1</div>
							<div id="defid" style="display:none;"></div>
							<div class="mui-slider-right mui-disabled">
								<a class="mui-btn bg-d6" id="reset_1">设定有遗留</a>
								<a class="mui-btn bg-90" id="reset_2">设定已消缺</a>
								<a class="deleteBtn mui-btn bg-ff">删除</a>
							</div>
							<div class="mui-slider-handle">
								<div class="mui-pull-right  col-FFF patrol font-13" id="result">已消缺</div>
								<div class="mui-media-body col-fonts">
									<div class="font-16 ells" id="des">温度过高 风扇损坏</div>
									<div class="font-13" id="buildtime" data-fmtFun="dateOfEmpty">2017年10月9日发现</div>
								</div>
							</div>
						</li>
						<li class="bank10" id="cutline"></li>
					</ul>
				</div>
				<!--有遗留-->
				<div id="leave" class="mui-control-content">
					<ul class="mui-table-view af-he be-he">
						<li class="mui-table-view-cell mui-media af-he" style="display:none;" id="legacy">
						<div id="params" style="display:none;">2</div>
							<div id="defid" style="display:none;"></div>
							<div class="mui-slider-right mui-disabled">
								<a class="mui-btn bg-d6" id="reset_1" >设定有遗留</a>
								<a class="mui-btn bg-90" id="reset_2">设定已消缺</a>
								<a class="deleteBtn mui-btn bg-ff">删除</a>
							</div>
							<div class="mui-slider-handle">
								<div class="mui-pull-right  col-FFF patrol font-13" id="result">已消缺</div>
								<div class="mui-media-body col-fonts">
									<div class="font-16 ells" id="des">温度过高 风扇损坏</div>
									<div class="font-13" id="buildtime" data-fmtFun="dateOfEmpty">2017年10月9日发现</div>
								</div>
							</div>
						</li>
						<li class="bank10" id="cutline"></li>
					</ul>
				</div>
				<!--全部-->
				<div id="myInfor" class="mui-control-content">
					<ul class="mui-table-view af-he be-he">
						<li class="mui-table-view-cell mui-media af-he patrolClick" style="display:none;" id="mydef">
							<div id="defid" style="display:none;"></div>
							<div class="mui-slider-right mui-disabled">
								<a class="mui-btn bg-d6" id="reset_1">设定有遗留</a>
								<a class="mui-btn bg-90" id="reset_2">设定已消缺</a>
								<a class="deleteBtn mui-btn bg-ff">删除</a>
							</div>
							<div class="mui-slider-handle">
								<div class="mui-pull-right  col-FFF patrol font-13" id="result" >未消缺</div>
								<div class="mui-media-body col-fonts">
									<div class="font-16 ells" id="des">温度过高 风扇损坏</div>
									<div class="font-13" id="buildtime" data-fmtFun="dateOfEmpty">2017年10月9日发现</div>
								</div>
							</div>
						</li>
						<li class="bank10" id="cutline"></li>
					
					</ul>
				</div>
			</div>
			</div>
		</div>
	</body>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/mui.min.js"></script>
	<script src="../js/main.js"></script>
	<script src="../js/defect/defect.js"></script>
	<script type="text/javascript" src="../libs/minirefresh.min.js"></script>
	<!--<script type="text/javascript" src="../js/webviewhand.js"></script>-->
	<script type="text/javascript" src="../libs/themes/default/minirefresh.theme.default.min.js"></script>
	
	<script>
	initItem();
	function initItem(){
        //搜索
        $(".searchBtn").on("click", function(){
        	$("#search").val("");
        	$(".searchDiv").show();
        	$("#segmentedControl").hide();
        });
        
       /*$("#addpage").off("tap");
       mui(".mui-scroll").on("tap","#addpage",function(e){
    	   e.preventDefault();
   			e.stopPropagation();
   			router.href($(this).attr("href"));
       })*/
       
        //查询对对a标签进行监听
        var id="#myInfor"
        mui("#segmentedControl").on('tap','a',function(){
        	if($(this).attr("href")!=""){
        		id = $(this).attr("href");
        	}
        });
        $("#search").on('input',function(){
        	search=this.value;
        	
        	listDefect($(id+" li:eq(0)").attr("id"));
        });
    	//消息选中未消缺
       var way = param.way
       if(way=="nodefect"){
    		   $("#segmentedControl").find("a").removeClass("mui-active");
        	   $("#segmentedControl").find("a[href='#noXQ']").addClass("mui-active"); 
        	   $(".mui-control-content").removeClass("mui-active");
        	   $("#noXQ").addClass("mui-active");
        	   param.way="";
       }
       $("nav a").removeClass("mui-active");
	   	$("nav a").find("img").each(function(){
			var newsrc = $(this).attr("src").replace("-hover","");
			$(this).attr("src",newsrc);
		});
        $("nav a").find("img[src*='"+param.sel+"']").attr("src","../img/"+param.sel+"-hover.png");
        $("nav a").find("img[src*='"+param.sel+"']").closest("a").addClass("mui-active");
        
        //下拉刷新
		var miniRefresh = new MiniRefresh({
		    container: '#minirefresh',
		    down: {
		    	isLock:false,
		    	offset:50,
		    	successAnim:{
		    		isEnable:true,
		    		duration:500
		    	},
		        callback: function() {
		        	refresh();
		            setTimeout(function(){
		            	miniRefresh.endDownLoading(true,'');
		            },1000);
		        }
		    },
		    up:{isLock:true}
		});
	}
	</script>
</html>
